<?php
/**
 * Layout class
 *
 * Help to form a layout of application.
 *
 */
class Layout {

	
	protected $data = array();
	private $CI;
	
	function __construct()
	{
		$this->CI = & get_instance();
	}
	

	function view($view_name = '', $data = array())
	{

		$this->data = array_merge($this->data, $data);

		$this->CI->load->view('header', $this->data);
		$this->CI->load->view($view_name, $this->data);
		$this->CI->load->view('footer', $this->data);
	}
}

/* End of file layout.php */
